package com.ym.medical.domain.param;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.HealthCoinSourceSettingEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

/**
 * ComputerName:LAPTOP-I6GKDIFQ
 * Author:admin
 * Date: 2019-08-27
 * Time: 17:05:56
 * Comment:查询扩展工具类
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class HealthCoinSourceSettingParam extends BeanCovert<HealthCoinSourceSettingEntity> {

    @ApiModelProperty(notes = "主键")
    private Long id;

    @ApiModelProperty(notes = "获取渠道：01签到02充值")
    @NotNull(message="获取渠道：01签到02充值不能为空!",groups = {Add.class})
    @Size(max = 2 , message = "获取渠道：01签到02充值长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String sourceType;

    @ApiModelProperty(notes = "开始时间")
    private Date startTime;

    @ApiModelProperty(notes = "截止时间")
    private Date endTime;

    @ApiModelProperty(notes = "每次获取个数")
    @Max(value=2147483647,message="每次获取个数最大值不能高于{value}",groups = {Add.class,Update.class})
    @Min(value=-2147483648,message="每次获取个数最小值不能低于{value}",groups = {Add.class,Update.class})
    private Integer eveyNum;

    @ApiModelProperty(notes = "健康币上限.0表示无上限")
    @Max(value=2147483647,message="健康币上限.0表示无上限最大值不能高于{value}",groups = {Add.class,Update.class})
    @Min(value=-2147483648,message="健康币上限.0表示无上限最小值不能低于{value}",groups = {Add.class,Update.class})
    private Integer limitNum;

    @ApiModelProperty(notes = "上限周期单位")
    @Size(max = 2 , message = "上限周期单位长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String limitUnit;

    @ApiModelProperty(notes = "备注")
    @Size(max = 200 , message = "备注长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String remark;

    @ApiModelProperty(notes = "有效无效00无效01有效")
    @Size(max = 2 , message = "有效无效00无效01有效长度必须在{min}和{max}之间",groups = {Add.class,Update.class})
    private String valid;

    @ApiModelProperty(notes = "创建时间")
    private Date createTime;

    @ApiModelProperty(notes = "创建人")
    private Long createSb;

    @ApiModelProperty(notes = "获取渠道：01签到02充值")
    private String sourceTypeName;

    @ApiModelProperty(notes = "上限周期单位")
    private String limitUnitName;

    @ApiModelProperty(notes = "有效无效00无效01有效")
    private String validName;

    @ApiModelProperty("用户id")
    private Long userId;

    public interface Add {}

    public interface Update{}

}
